package com.hdu.ordered;

public class TestKeyRunnable implements Runnable, Ordered {

    private final String key;
    private final String id;

    public TestKeyRunnable(String key, String id) {
        this.key = key;
        this.id = id;
    }

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public void run() {
        System.out.println(
                "key:" + key + " id:" + id + " thread:" + Thread.currentThread().getName() + " run"
        );
    }
}
